import 'dart:convert';

import 'package:azlistview/azlistview.dart';

class Friend extends ISuspensionBean {
  String name;
  String? tagIndex;
  String? namePinyin;
  String? subTitle;
  String? avatar;
  String? identifier;
  String? avatarUrl;
  String? ethAddress;
  String? membership;
  String? ppcInfo;
  String? hertInfo;
  double? rfgBalance;
  double? socialScore;
  Map<String, int>? spaceNFTs;
  Map<String, int>? resourceNFTs;

  Friend({
    required this.name,
    required this.tagIndex,
    this.avatarUrl,
    this.ethAddress,
    this.membership,
    this.ppcInfo,
    this.hertInfo,
    this.rfgBalance,
    this.socialScore,
    this.spaceNFTs,
    this.resourceNFTs,
  });

  Friend.fromJson(Map<String, dynamic> json)
    : name = json['name'],
      subTitle = json['subTitle'],
      avatar = json['avatar'];

  @override
  String getSuspensionTag() => tagIndex!;

  @override
  String toString() => json.encode(this);
}
